﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">

    <Style x:Key="style_loginwindow" TargetType="sdk:ChildWindow">
        <Setter Property="IsTabStop" Value="false" />
        <Setter Property="TabNavigation" Value="Cycle" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                    <GradientStop Offset="0" Color="#FFA3AEB9" />
                    <GradientStop Offset="0.375" Color="#FF8399A9" />
                    <GradientStop Offset="0.375" Color="#FF718597" />
                    <GradientStop Offset="1" Color="#FF617584" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="OverlayBrush" Value="#7F000000" />
        <Setter Property="OverlayOpacity" Value="1" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="sdk:ChildWindow">
                    <Grid x:Name="Root">
                        <Grid.Resources>
                            <Style x:Key="ButtonStyle" TargetType="Button">
                                <Setter Property="Background" Value="#FF1F3B53" />
                                <Setter Property="Foreground" Value="#FF000000" />
                                <Setter Property="Padding" Value="3" />
                                <Setter Property="BorderThickness" Value="1" />
                                <Setter Property="BorderBrush">
                                    <Setter.Value>
                                        <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                                            <GradientStop Offset="0" Color="#FFA3AEB9" />
                                            <GradientStop Offset="0.375" Color="#FF8399A9" />
                                            <GradientStop Offset="0.375" Color="#FF718597" />
                                            <GradientStop Offset="1" Color="#FF617584" />
                                        </LinearGradientBrush>
                                    </Setter.Value>
                                </Setter>
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="Button">
                                            <Grid x:Name="grid"
                                                  Width="15"
                                                  Height="14"
                                                  HorizontalAlignment="Center"
                                                  VerticalAlignment="Center"
                                                  Background="#02FFFFFF">
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualState x:Name="Normal" />
                                                        <VisualState x:Name="MouseOver">
                                                            <Storyboard>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="X_Fuzz2" Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="X_Fuzz1" Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="X_Fuzz0" Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <DoubleAnimation Duration="0"
                                                                                 Storyboard.TargetName="X"
                                                                                 Storyboard.TargetProperty="Opacity"
                                                                                 To="0.95" />
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Pressed">
                                                            <Storyboard>
                                                                <DoubleAnimation Duration="0"
                                                                                 Storyboard.TargetName="X"
                                                                                 Storyboard.TargetProperty="Opacity"
                                                                                 To="0.85" />
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="X_Fuzz2" Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="X_Fuzz1" Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="X_Fuzz0" Storyboard.TargetProperty="Visibility">
                                                                    <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                                                </ObjectAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimation Duration="0"
                                                                                 Storyboard.TargetName="X"
                                                                                 Storyboard.TargetProperty="Opacity"
                                                                                 To="0.5" />
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Path x:Name="X_Fuzz2"
                                                      Width="9"
                                                      Height="8"
                                                      Margin="0,-1,0,0"
                                                      HorizontalAlignment="Center"
                                                      VerticalAlignment="Center"
                                                      Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z"
                                                      Fill="#14C51900"
                                                      Opacity="1"
                                                      RenderTransformOrigin="0.5,0.5"
                                                      Stretch="Fill"
                                                      Stroke="#14C51900"
                                                      Visibility="Collapsed">
                                                    <Path.RenderTransform>
                                                        <TransformGroup>
                                                            <ScaleTransform ScaleX="1.3" ScaleY="1.3" />
                                                        </TransformGroup>
                                                    </Path.RenderTransform>
                                                </Path>
                                                <Path x:Name="X_Fuzz1"
                                                      Width="9"
                                                      Height="8"
                                                      Margin="0,-1,0,0"
                                                      HorizontalAlignment="Center"
                                                      VerticalAlignment="Center"
                                                      Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z"
                                                      Fill="#1EC51900"
                                                      Opacity="1"
                                                      RenderTransformOrigin="0.5,0.5"
                                                      Stretch="Fill"
                                                      Stroke="#1EC51900"
                                                      Visibility="Collapsed">
                                                    <Path.RenderTransform>
                                                        <TransformGroup>
                                                            <ScaleTransform ScaleX="1.1" ScaleY="1.1" />
                                                        </TransformGroup>
                                                    </Path.RenderTransform>
                                                </Path>
                                                <Path x:Name="X_Fuzz0"
                                                      Width="9"
                                                      Height="8"
                                                      Margin="0,-1,0,0"
                                                      HorizontalAlignment="Center"
                                                      VerticalAlignment="Center"
                                                      Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z"
                                                      Fill="#FFC51900"
                                                      Opacity="1"
                                                      Stretch="Fill"
                                                      Stroke="#FFC51900"
                                                      Visibility="Collapsed" />
                                                <Path x:Name="X"
                                                      Width="9"
                                                      Height="8"
                                                      Margin="0,-1,0,0"
                                                      HorizontalAlignment="Center"
                                                      VerticalAlignment="Center"
                                                      Data="F1 M 6.742676,3.852539 L 9.110840,1.559570 L 8.910645,0.500000 L 6.838379,0.500000 L 4.902832,2.435547 L 2.967285,0.500000 L 0.895020,0.500000 L 0.694824,1.559570 L 3.062988,3.852539 L 0.527832,6.351563 L 0.689941,7.600586 L 2.967285,7.600586 L 4.897949,5.575195 L 6.854004,7.600586 L 9.115723,7.600586 L 9.277832,6.351563 L 6.742676,3.852539 Z"
                                                      Fill="#FFFFFFFF"
                                                      Opacity="0.7"
                                                      Stretch="Fill">
                                                    <Path.Stroke>
                                                        <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
                                                            <GradientStop Offset="1" Color="#FF313131" />
                                                            <GradientStop Offset="0" Color="#FF8E9092" />
                                                        </LinearGradientBrush>
                                                    </Path.Stroke>
                                                </Path>
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="WindowStates">
                                <VisualState x:Name="Open">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="0"
                                                                       Storyboard.TargetName="Overlay"
                                                                       Storyboard.TargetProperty="Opacity">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0" />
                                            <EasingDoubleKeyFrame KeyTime="00:00:00.3" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="0"
                                                                       Storyboard.TargetName="ContentRoot"
                                                                       Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleX">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="0" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.4" Value="1" />
                                            <SplineDoubleKeyFrame KeySpline="0,0,0.5,1"
                                                                  KeyTime="00:00:00.45"
                                                                  Value="1.05" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.55" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="0"
                                                                       Storyboard.TargetName="ContentRoot"
                                                                       Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY">
                                            <SplineDoubleKeyFrame KeyTime="0" Value="0" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="0" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.4" Value="1" />
                                            <SplineDoubleKeyFrame KeySpline="0,0,0.5,1"
                                                                  KeyTime="00:00:00.45"
                                                                  Value="1.05" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.55" Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Closed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="0"
                                                                       Storyboard.TargetName="Overlay"
                                                                       Storyboard.TargetProperty="Opacity">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1" />
                                            <EasingDoubleKeyFrame KeyTime="00:00:00.3" Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="0"
                                                                       Storyboard.TargetName="ContentRoot"
                                                                       Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleX">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="1" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="1.05" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.45" Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="0"
                                                                       Storyboard.TargetName="ContentRoot"
                                                                       Storyboard.TargetProperty="(RenderTransform).(Children)[0].ScaleY">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.2" Value="1" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.25" Value="1.05" />
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.45" Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid x:Name="Overlay"
                              Margin="0"
                              HorizontalAlignment="Stretch"
                              VerticalAlignment="Top"
                              Background="{TemplateBinding OverlayBrush}"
                              Opacity="{TemplateBinding OverlayOpacity}" />
                        <Grid x:Name="ContentRoot"
                              Width="{TemplateBinding Width}"
                              Height="{TemplateBinding Height}"
                              HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                              VerticalAlignment="{TemplateBinding VerticalAlignment}"
                              RenderTransformOrigin="0.5,0.5">
                            <Grid.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform />
                                    <SkewTransform />
                                    <RotateTransform />
                                    <TranslateTransform />
                                </TransformGroup>
                            </Grid.RenderTransform>
                            <Border Margin="-1"
                                    HorizontalAlignment="Stretch"
                                    VerticalAlignment="Stretch"
                                    Background="#14FFFFFF"
                                    BorderBrush="#14000000"
                                    BorderThickness="1"
                                    CornerRadius="8" />
                            <Border Margin="18"
                                    Background="#FFFFFFFF"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    CornerRadius="4">
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition />
                                    </Grid.RowDefinitions>
                                    <Border x:Name="Chrome"
                                            Width="Auto"
                                            BorderBrush="#FFFFFFFF"
                                            BorderThickness="0">
                                        <Grid Width="Auto" Height="Auto">
                                            <Border Width="{Binding ActualWidth,
                                                                    ElementName=border}"
                                                    HorizontalAlignment="Center"
                                                    Background="White"
                                                    CornerRadius="0,0,5,5">
                                                <Border.Effect>
                                                    <DropShadowEffect Direction="275" Opacity=".8" />
                                                </Border.Effect>
                                            </Border>
                                            <Border x:Name="border"
                                                    HorizontalAlignment="Center"
                                                    CornerRadius="0,0,5,5"
                                                    Padding="32,6">
                                                <Border.Background>
                                                    <RadialGradientBrush Center="0.903,1.022" GradientOrigin="0.903,1.022" RadiusX="1.677" RadiusY="1.91">
                                                        <GradientStop Color="#3FFF9700" />
                                                        <GradientStop Offset="1" Color="#7FFF9700" />
                                                        <GradientStop Offset="0.547" Color="#99FF9700" />
                                                        <GradientStop Offset="0.547" Color="#66FF9700" />
                                                    </RadialGradientBrush>
                                                </Border.Background>
                                                <ContentControl Margin="6,0,6,0"
                                                                HorizontalAlignment="Center"
                                                                VerticalAlignment="Center"
                                                                Content="{TemplateBinding Title}"
                                                                FontFamily="Microsoft YaHei Light"
                                                                FontWeight="Bold"
                                                                IsTabStop="False" />
                                            </Border>
                                            <Button x:Name="CloseButton"
                                                    Width="15"
                                                    Height="14"
                                                    HorizontalAlignment="Right"
                                                    VerticalAlignment="Center"
                                                    IsTabStop="False"
                                                    Style="{StaticResource ButtonStyle}" />
                                        </Grid>
                                    </Border>
                                    <Border Grid.Row="1"
                                            Margin="8"
                                            Background="{TemplateBinding Background}">
                                        <ContentPresenter x:Name="ContentPresenter"
                                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                          Content="{TemplateBinding Content}"
                                                          ContentTemplate="{TemplateBinding ContentTemplate}" />
                                    </Border>
                                </Grid>
                            </Border>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
